#!/usr/bin/env ruby1.9
# encoding: UTF-8

require 'term/ansicolor'

require './lib/hindo.rb'

describe JapaneseWordFilter, "filter words" do

    it "filters words no japanese words" do
	$log = mock "Log"
        $log.should_receive(:debug)

        filter = JapaneseWordFilter.new ["悪い"]

        filter.collectable?("猫猫").should == true
        filter.collectable?("bad").should == false
        filter.collectable?("悪い").should == false
    end

end

describe LatinWordFilter, "filter words" do

    it "filters words non english words" do
	$log = mock "Log"
        $log.should_receive(:debug)

        filter = LatinWordFilter.new ["good"]

        filter.collectable?("猫猫").should == false
        filter.collectable?("bad").should == true
        filter.collectable?("good").should == false
    end 

end
